#pragma once
#ifndef TM_BASE_LOGGING_H_
#define TM_BASE_LOGGING_H_

#include <log4cxx/logger.h>

namespace recognition {

using namespace std;

const string Format(const char *fmt, ...);

#define LOG_TRACE(logger, fmt, ...) LOG4CXX_TRACE(logger, Format(fmt, ## __VA_ARGS__))
#define LOG_DEBUG(logger, fmt, ...) LOG4CXX_DEBUG(logger, Format(fmt, ## __VA_ARGS__))
#define LOG_INFO(logger, fmt, ...) LOG4CXX_INFO(logger, Format(fmt, ## __VA_ARGS__))
#define LOG_WARN(logger, fmt, ...) LOG4CXX_WARN(logger, Format(fmt, ## __VA_ARGS__))
#define LOG_ERROR(logger, fmt, ...) LOG4CXX_ERROR(logger, Format(fmt, ## __VA_ARGS__))
#define LOG_FATAL(logger, fmt, ...) LOG4CXX_FATAL(logger, Format(fmt, ## __VA_ARGS__))

const string kInputArgumentsTableBorders = Format("+%s+%s+%s+%s+",
			string(15, '-').c_str(), string(40, '-').c_str(), string(10, '-').c_str(), string(10, '-').c_str());

#define __FMT_RUNNING_SIMULATION "Running simulation..."
#define __FMT_SIMULATION_INPUT "Input parameters: %15s%d, Skip range: [%.1f, %.1f]"
const string kSimulationTableBorders = Format("+%s+%s+%s+%s+%s+",
		string(5, '-').c_str(), string(10, '-').c_str(), string(15, '-').c_str(), string(15, '-').c_str(), string(15, '-').c_str());

#define __FMT_SIMULATION_TABS "|%-5s|%-10s|%-15s|%-15s|%-15s|"
#define __FMT_SIMULATION_AVEGAGE_RESULT "|%-5s %10s:%-15.2f %15s:%-15.4f|"

#define __FMT_SIMULATION_ITERATION_RESULT "|%-5d|%-10.1f|%-15.2f|%-15f|%4d, %-9d|"

static const char PADDER[] = "..................................................";	// 50


}	// namespace recognition

#endif	// TM_BASE_LOGGING_H_
